﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YY.Common;

namespace WebApp
{
    public partial class BalanceFrm : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(typeof(BalanceFrm), this);
        }

        [AjaxPro.AjaxMethod]
        public AjaxResult<bool> DeleteBalance(int id)
        {
            AjaxResult<bool> result = new AjaxResult<bool>();
            result.Data = false;
            result.Msg = null;
            try
            {
                if (!this.IsPermitOP(EnumCommon.PermissionOpType.Delete, this.GetType().Name))
                {
                    result.Msg = "没有操作权限！";
                    return result;
                }

                result.Data = this.BaseDataProxy.DeleteBalance(id);
            }
            catch (Exception ex)
            {
                result.Data = false;
                result.Msg = ex.Message;
            }
            return result;
        }
    }
}
